﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;

namespace MyFound.Wpf.Validations
{
    public class RequiredValidation : ValidationRule
    {
        public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo)
        {
            if(value==null||string.IsNullOrWhiteSpace(value.ToString()))
                return new ValidationResult(false,"必填");
            return new ValidationResult(true,null);
        }
    }
}
